<template>
	<view style="background-color: #C8C7CC;">
		<view class="wrap">
			<view class="item" @tap="nav('https://www.zzhaolei.com/index.php?s=/Weizhang/carlist.html')">
				<view class="img">
					<image src="../../static/weizhang.png" />
				</view>
				<view>车辆信息</view>
			</view>
			<!-- <view class="item" @tap="nav('pages/item1/index')">
				<view class="img">
					<image src="../../static/zhengjian1.png" />
				</view>
				<view>补换行驶证</view>
			</view>
			<view class="item" @tap="nav('pages/item2/index')">
				<view class="img">
					<image src="../../static/zhengjian2.png" />
				</view>
				<view>补换驾驶证</view>
			</view>
			
			<view class="item" @tap="nav('pages/item4/index')">
				<view class="img">
					<image src="../../static/zhengjian3.png" />
				</view>
				<view>补换车牌照</view>
			</view> -->
			
			<view class="item" >
				
			</view>
			
			<view class="item" >
				
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			};
		},
		methods:{
			nav(url){
				let str = url.substring(0,5)
				console.log(url)
				
				if(str == 'https'){
					url = escape(url)
					uni.navigateTo({
						url:`../h5/h5?url=${url}`
					})	
				}else{
					// 跳转小程序
					uni.navigateToMiniProgram({
					  appId: 'wx3412a62a9fb0d035',
					  path: url,
					  success(res) {
					    // 打开成功
					  }
					})
				}
				
				// console.log(url)
				
			},
			//分享
			onShareAppMessage(res) {
				return {
					title: '六年免检标签',
					path: `pages/index/index?pid=${getApp().globalData.uid}`
				}
			}
		}
	}
</script>

<style lang="scss">
	.wrap {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-around;
		align-items: center;
		background-color:#fff;
		.item {
			width: 120rpx;
			height: 120rpx;
			display: flex;
			justify-content: center;
			align-items: center;
			flex-direction: column;
			font-size: 22rpx;
			margin:10rpx 40rpx;
			.img{
				width: 60rpx;
				height: 60rpx;
			}
		}
	}
</style>
